package com.lyf.language.learn.atsgg.enumsample;

/**
 * @AUTHOR LYF
 * @DATE 2022/6/5
 * @VERSION 1.0
 * @DESC
 * enum关键字
 */
public enum Status2 {

    // 不构造具体参数
//    SEVER_ERROR,
//    CAN_NOT_FOUND

    SEVER_ERROR("服务器内部错误",500),
    CAN_NOT_FOUND("请求URL错误",404);


    private String msg;
    private Integer code;
    Status2(String msg, Integer code) {
        this.msg = msg;
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public Integer getCode() {
        return code;
    }
}
